//
//  DaV_listImageViewController.m
//  DA_V
//
//  Created by 中亿世联前台 on 15/4/27.
//  Copyright (c) 2015年 zhouhai. All rights reserved.
//

#import "DaV_listImageViewController.h"
#import "InterFace.h"

@interface DaV_listImageViewController ()
{
    NSArray *_images;

}
@end

@implementation DaV_listImageViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _images = [[NSArray alloc] initWithObjects:
               [UIImage imageNamed:@"0.jpeg"],
               [UIImage imageNamed:@"1.jpeg"],
               [UIImage imageNamed:@"2.jpeg"],
               [UIImage imageNamed:@"3.jpeg"],
               [UIImage imageNamed:@"4.jpeg"],
               [UIImage imageNamed:@"5.jpeg"],
               [UIImage imageNamed:@"6.jpeg"],
               [UIImage imageNamed:@"7.jpeg"],
               [UIImage imageNamed:@"8.jpeg"],
               [UIImage imageNamed:@"9.jpeg"],
               [UIImage imageNamed:@"10.jpeg"], nil];
    [self createScrollImageViwe];
}


#pragma -mark 创建滑动图片

- (void)createScrollImageViwe{

    UIScrollView *myScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    myScrollView.contentSize = CGSizeMake(SCREEN_WIDTH*[_images count], 0);
    
    [self.view addSubview:myScrollView];
    
    for (int i = 0; i < [_images count]; i++) {
        
        UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(i*SCREEN_WIDTH, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
        image.image = _images[i];
        [myScrollView addSubview:image];
    }
    [self.view addSubview:myScrollView];
}

@end
